var e = require('./index.js');

setTimeout(()=>{
    e.echo('--------------------')
    e.echo('0 koa:',new Date());
    let koa = e['http://github.com/koajs/koa.git'];
    e.echo('1 koa:',new Date());
},1000);

var test = e.$test$t1;

setTimeout(function() {
    e.echo('--------------------')
    e.echo('0 socket.io:',new Date());
    var io = e._ws(3001);
    io.on('connection',(skt)=>{
        skt.on('hello',(name,callback)=>{
            e.echo(name,'say hello');
            callback('You are welcom');
        })
    });
    var ioc = e._wsc('http://localhost:3001');
    ioc.emit('hello','huwei',(msg)=>e.echo(msg));
    e.echo('1 socket.io:',new Date());
}, 1000);

setTimeout(()=>{
    e.echo('--------------------')
    e.echo('0 remove all:',new Date());
    e.removeModules(['socket.io','socket.io-client','dotEver','koa']),
    e.echo('remove over',new Date());
}
,1000);
